using UnityEngine;
using System;
using System.Collections;

public class Menu : MonoBehaviour {

	private Vector3 initialPos = new Vector3(-14, 4, 618);
    private Vector3 finalPos = new Vector3(-12.7f, 4, 7.5f);
   //System.Boolean arrived = false;
	
	private Vector3 buttonsInitialPos = new Vector3 (9.5f, 20, 7.5f);
	private Vector3 newGameFinalPos = new Vector3(9.5f, 8, 7.5f);
	private Vector3 loadGameFinalPos = new Vector3(9.5f, 3.5f, 7.5f);
	private Vector3 optionsFinalPos = new Vector3(9.5f, -1, 7.5f);
	private Vector3 creditsFinalPos = new Vector3(9.5f, -5.5f, 7.5f);
	private Vector3 textFinalPos = new Vector3(-19.7f, -3.5f, 7.5f);
	private Vector3 textInitialPos = new Vector3(-46.5f, -3.5f, 7.5f);
	
	private Vector3 quitFinalPos;
	
    private Vector3 finalRotation = new Vector3(0, 0, 71); 

	public GameObject newGameObject, optionsObject, loadGameObject, creditsObject, gravityCubeObject, guiTextObject;

	private void Start () {
		
        this.gameObject.transform.position = initialPos;		
		
		newGameObject.transform.position = buttonsInitialPos;
		optionsObject.transform.position = buttonsInitialPos;
		creditsObject.transform.position = buttonsInitialPos;
		loadGameObject.transform.position = buttonsInitialPos;
		guiTextObject.transform.position = textInitialPos;
		
        iTween.MoveTo(gravityCubeObject, this.finalPos, 1.75f);
		iTween.MoveTo(guiTextObject, this.textFinalPos, 1.75f);
		
        iTween.RotateTo(gravityCubeObject, this.finalRotation, 1.75f);
		
		iTween.MoveTo(newGameObject, this.newGameFinalPos, 4);	
		iTween.MoveTo(loadGameObject, this.loadGameFinalPos, 4);
		iTween.MoveTo(optionsObject, this.optionsFinalPos, 4);
		iTween.MoveTo(creditsObject, this.creditsFinalPos, 4);
		
        
	}
}